home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Diamond Collection / The Diamond Collection (Software Vault)(Digital Impact).ISO / cdr28 / par300.zip / EXAMPL07.STX < prev    next >
Text File  |  1995-04-05  |  2KB  |  26 lines

  1. ;C
  2. ┌─────────────────────────────────────────────────────────────────────────────┐
  3. │ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░    EXAMPLE # 7    ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ │
  4. └─────────────────────────────────────────────────────────────────────────────┘
  5. ┌─────────────────────────────────────────────────────────────────────────────┐
  6. │                                                                             │
  7. │ THE INPUT FILE:  A list of products available from Pinnacle Software.  The  │
  8. │                  data has been put into columns using the tab (ASCII 09)    │
  9. │ character.  If the tab width is 2 characters, the two columns of data line  │
  10. │ up nicely at positions 1 and 23. When you look at the input, you'll notice  │
  11. │ that our little file viewer shows these characters as small circles, since  │
  12. │ that is what the IBM character set uses for ASCII 09. Most word processors  │
  13. │ convert ASCII 09 to a tab, though they do not always use the same spacing   │
  14. │ (i.e. some treat ASCII 09 like 3 spaces while some treat it like 8.)        │
  15. │                                                                             │
  16. │ WHAT WE WANT:  Replace each tab character with two spaces, so the data is   │
  17. │                in neat columns and we convert it to comma-delimited format. │
  18. │                                                                             │
  19. │ HOW WE DO IT:  (1) We use CHANGE to change each tab to two spaces.          │
  20. │                (2) We use SET to extract the columns.                       │
  21. │                (3) We use TRIM to remove excess spaces.                     │
  22. │                                                                             │
  23. └─────────────────────────────────────────────────────────────────────────────┘
  24.  
  25. ;P
  26.